package cn.jsony.pet.mapper;

import cn.jsony.pet.domain.Pet;
import cn.jsony.basic.mapper.BaseMapper;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Tom
 * @since 2022-07-22
 */
public interface PetMapper extends BaseMapper<Pet> {

    /*//下架：修改state为0，offsaletime为当前时间 ,可以用批量操作
    Map<String,Object> params = new HashMap<>();
        params.put("ids",ids);
        params.put("offsaletime",new Date());
        petMapper.offsale(params);*/
    void offsale(Map<String, Object> params);


   /* //数据库操作
    Map<String,Object> params = new HashMap<>();
                params.put("id",id);
                params.put("onsaletime",new Date());
                petMapper.onsale(params);*/
    void onsale(Map<String, Object> params);

    Pet findOnebyshopid(Long id);
}
